import request from "@/utils/request";

export function getExpenseItems(paramters) {
  return request({
    url: "api/v1/expense-items",
    method: "get",
    params: paramters,
    basicDataServer: true,
  });
}

export function getExpenseItem(id) {
  return request({
    url: "api/v1/expense-items/"+id,
    method: "get",
    basicDataServer: true,
  });
}

export function addExpenseItem(data) {
  return request({
    url: "api/v1/expense-items",
    method: "post",
    data: data,
    basicDataServer: true,
  });
}

export function updateExpenseItem(data) {
  return request({
    url: "api/v1/expense-items",
    method: "put",
    data: data,
    basicDataServer: true,
  });
}

export function deleteExpenseItem(id) {
  return request({
    url: "api/v1/expense-items/" + id,
    method: "delete",
    basicDataServer: true,
  });
}